package com.lizhiyu.flink.demo2_source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * 通过文件创建数据源
 */
public class FileSource {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment evn = StreamExecutionEnvironment.createLocalEnvironment();
        DataStreamSource<String> ds = evn.readTextFile("C:\\Users\\tfliz\\Desktop\\aaa.txt");
        ds.print();
        evn.execute();
    }
}
